package com.ambitor.grass.sql.dao;

import java.sql.Connection;
import java.sql.ResultSet;

import com.ambitor.grass.sql.data.Parameter;
import com.ambitor.grass.util.data.IData;
import com.ambitor.grass.util.data.IDataset;

public interface BaseDao {

	ResultSet executeQuery(String sql) throws Exception;

	ResultSet executeQuery(String sql, Parameter param) throws Exception;

	ResultSet executeQuery(String sql, IData param) throws Exception;

	int executeUpdate(String sql) throws Exception;

	int executeUpdate(String sql, Parameter param) throws Exception;

	int executeUpdate(String sql, IData param) throws Exception;

	String executeInsertAndReturnLastInsertId(String sql) throws Exception;

	String executeInsertAndReturnLastInsertId(String sql, Parameter param)
			throws Exception;

	String executeInsertAndReturnLastInsertId(String sql, IData param)
			throws Exception;

	int[] executeBatch(String[] sqls) throws Exception;

	int[] executeBatch(String sql, Parameter[] params) throws Exception;

	int[] executeBatch(String sql, IDataset params) throws Exception;
	
	Connection getConnection();

}
